{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "62f28417",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1.2.5\n",
      "1.21.0\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "import pandas as pd\n",
    "\n",
    "print(pd.__version__)\n",
    "print(np.__version__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "336dd5da",
   "metadata": {},
   "outputs": [],
   "source": [
    "s = pd.Series([1, 2, 3, 4], index=[\"a\", \"b\", \"c\", \"d\"], name=\"x\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "032e1498",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "\n",
      "a    1\n",
      "Name: x, dtype: int64\n",
      "\n",
      "a    1\n",
      "b    2\n",
      "Name: x, dtype: int64\n",
      "\n",
      "a    1\n",
      "c    3\n",
      "Name: x, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "print(s.iloc[0])\n",
    "print()\n",
    "print(s.iloc[[0]])\n",
    "print()\n",
    "print(s.iloc[0:2])\n",
    "print()\n",
    "print(s.iloc[[0, 2]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "12881016",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "print(s.iat[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "8ff2d83a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "\n",
      "a    1\n",
      "Name: x, dtype: int64\n",
      "\n",
      "a    1\n",
      "b    2\n",
      "Name: x, dtype: int64\n"
     ]
    }
   ],
   "source": [
    "print(s.loc[\"a\"])\n",
    "print()\n",
    "print(s.loc[[\"a\"]])\n",
    "print()\n",
    "print(s.loc[[\"a\", \"b\"]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "6880b2fa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n"
     ]
    }
   ],
   "source": [
    "print(s.at[\"a\"])"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
